package Thread.New.Thread;


public class MyThred extends Thread{

    public MyThred(){
    }

    public MyThred(String name){
        super(name);
    }

    @Override
    public void run(){
        //这样重写一下run方法
        System.out.println(Thread.currentThread().getName());
        //里面的getName()是获取线程名称
        //Thread-0
    }
}
